package com.design.cjm.behavioral.Iterator.example1;

/**
 * @Author: Jie Ming Chen
 * @Date: 2019-04-07
 * @Version 1.0
 */
public class Test {
    public static void main(String[] args) {
        Aggregate aggregate = new ConcreteAggregate();
        Iterator<Integer> iterator = aggregate.createIterator();
        while (iterator.hasNext()) {
            System.out.println(iterator.next());
        }
    }
}
